cmake_minimum_required (VERSION 3.9)

add_executable(rd_compare.exe                 rd_compare.cpp)
add_executable(rd_d8_flowdirs.exe             rd_d8_flowdirs.cpp)
add_executable(rd_depression_hierarchy.exe    rd_depression_hierarchy.cpp)
add_executable(rd_depressions_breach.exe      rd_depressions_breach.cpp)
add_executable(rd_depressions_flood.exe       rd_depressions_flood.cpp)
add_executable(rd_depressions_has.exe         rd_depressions_has.cpp)
add_executable(rd_depressions_mask.exe        rd_depressions_mask.cpp)
add_executable(rd_expand_dimensions.exe       rd_expand_dimensions.cpp)
add_executable(rd_fill_spill_merge.exe        rd_fill_spill_merge.cpp)
add_executable(rd_flood_for_flowdirs.exe      rd_flood_for_flowdirs.cpp)
add_executable(rd_flow_accumulation.exe       rd_flow_accumulation.cpp)
add_executable(rd_geotransform.exe            rd_geotransform.cpp)
add_executable(rd_hist.exe                    rd_hist.cpp)
add_executable(rd_loop_check.exe              rd_loop_check.cpp)
add_executable(rd_merge_rasters_by_layout.exe rd_merge_rasters_by_layout.cpp)
add_executable(rd_no_data.exe                 rd_no_data.cpp)
add_executable(rd_processing_history.exe      rd_processing_history.cpp)
add_executable(rd_projection.exe              rd_projection.cpp)
add_executable(rd_raster_display.exe          rd_raster_display.cpp)
add_executable(rd_raster_inspect.exe          rd_raster_inspect.cpp)
add_executable(rd_taudem_d8_to_richdem_d8.exe rd_taudem_d8_to_richdem_d8.cpp)
add_executable(rd_terrain_property.exe        rd_terrain_property.cpp)

target_link_libraries(rd_compare.exe                  richdem)
target_link_libraries(rd_d8_flowdirs.exe              richdem)
target_link_libraries(rd_depression_hierarchy.exe     richdem)
target_link_libraries(rd_depressions_breach.exe       richdem)
target_link_libraries(rd_depressions_flood.exe        richdem)
target_link_libraries(rd_depressions_has.exe          richdem)
target_link_libraries(rd_depressions_mask.exe         richdem)
target_link_libraries(rd_expand_dimensions.exe        richdem)
target_link_libraries(rd_fill_spill_merge.exe         richdem)
target_link_libraries(rd_flood_for_flowdirs.exe       richdem)
target_link_libraries(rd_flow_accumulation.exe        richdem)
target_link_libraries(rd_geotransform.exe             richdem)
target_link_libraries(rd_hist.exe                     richdem)
target_link_libraries(rd_loop_check.exe               richdem)
target_link_libraries(rd_merge_rasters_by_layout.exe  richdem)
target_link_libraries(rd_no_data.exe                  richdem)
target_link_libraries(rd_processing_history.exe       richdem)
target_link_libraries(rd_projection.exe               richdem)
target_link_libraries(rd_raster_display.exe           richdem)
target_link_libraries(rd_raster_inspect.exe           richdem)
target_link_libraries(rd_taudem_d8_to_richdem_d8.exe  richdem)
target_link_libraries(rd_terrain_property.exe         richdem)